﻿#pragma once
#include <QtGui>
#include <QDebug>
#include <QThread>
#include "CoreSPCN.h"
#include <QProgressDialog>

extern CCoreSPCN *pSPCN;

class QSPCNThread : public QThread
{
	Q_OBJECT

public:
	QSPCNThread()
	{
		progrDial.setLabelText(QString("Progressing using %1 thread(s)...").arg(QThread::idealThreadCount()));
		progrDial.show();
	}
	~QSPCNThread(){}

	void run()
	{	
		pSPCN->PerformsCN();
		emit progress(pSPCN->getNowPerfom());
	}
		QProgressDialog progrDial;
signals:
	void progress(int);
};